/*
	This file is part of PropExtractor.

	PropExtractor is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	PropExtractor is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with PropExtractor. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _PEALICESOFTIMAGEVSP_H_
#define _PEALICESOFTIMAGEVSP_H_

#include "PEFile.h"

namespace pe
{

	struct AliceImageVspColor
	{
		byte b, g, r;
	};

	struct AliceImageVspHeader
	{
		byte data[10];
	};

	struct AliceImageVsp
	{
		AliceImageVspHeader* header;

		unsigned int x, y;
		unsigned int width, height;
		dword pb;
		dword p_offset;
		dword d_offset;
		AliceImageVspColor palette[16];

		unsigned int data_size;
		byte* data;
	};

	PE_EXPORT int AliceImageVspReadHeader(AliceImageVspHeader* a_Target, PEStream* a_Stream);
	PE_EXPORT int AliceImageVspReadData(AliceImageVsp* a_Target, AliceImageVspHeader* a_Header, PEStream* a_Stream);
	PE_EXPORT int AliceImageVspToRaw(PEImageRaw* a_Target, AliceImageVsp* a_Image);

	PE_EXPORT int AliceImageVspReadAndDecrypt(PEImageRaw* a_Target, PEStream* a_Stream);

	PE_EXPORT int AliceImageVspDeleteHeader(AliceImageVspHeader* a_Header);
	PE_EXPORT int AliceImageVspDeleteData(AliceImageVsp* a_Image);

}; // namespace pe

#endif